package cn.kimming.wms.domain;

import lombok.Getter;
import lombok.Setter;

public class SystemMenu extends BaseDomain{
	@Getter @Setter
	private String name;	//菜单名称
	@Getter @Setter
	private String url;		//彩带对应链接(子菜单拥有)
	@Getter @Setter
	private String sn;		//菜单编码(父菜单拥有)
	
	@Getter @Setter
	private SystemMenu parent;//many2one:parent_id

	@Override
	public String toString() {
		return "SystemMenu [name=" + name + ", url=" + url + ", sn=" + sn + "]";
	}
	
	public String getParentName() {
		return parent == null ? "根菜单" : parent.getName();
	}
	
}
